package com.bwie.controller;

import com.bwie.pojo.Result;
import com.bwie.pojo.dto.CarMonthDto;
import com.bwie.pojo.po.CarMonth;
import com.bwie.pojo.vo.CarMonthVo;
import com.bwie.service.CarMonthService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping("/carMonth")
public class CarMonthController {
    @Autowired
    private CarMonthService carMonthService;

    @ResponseBody
    @GetMapping("getCarMonth")
    public PageInfo<CarMonthVo> getCarMonth(CarMonthDto carMonthDto){
        PageInfo<CarMonthVo> pageInfo = carMonthService.getCarMonth(carMonthDto);
        return pageInfo;
    }



    @ResponseBody
    @PostMapping("updCarMonth")
    public Result updCarMonth(@RequestBody CarMonth carMonth){
        carMonthService.updCarMonth(carMonth);
        return Result.success();
    }



}
